//
//  RODatePickerView.h
//  Runone
//
//  Created by runone02 on 16/12/14.
//  Copyright © 2016年 runone. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RODatePickerDataModel.h"

//时间选择器的推出模式,默认为底部
typedef NS_ENUM(NSUInteger, RODatePickerViewPushModel) {
    RODatePickerViewPushModelBottom,   //底部
    RODatePickerViewPushModelMiddel    //中间
} ;

//时间选择器的样式
typedef NS_ENUM(NSUInteger, RODatePickerStyle) {
    RODatePickerStyleYearMonthDayHourMinuteSecond, //年月日时分秒
    RODatePickerStyleYearMonthDay,                 //年月日
    RODatePickerStyleMonthDayHourMinuteSecond,     //月日时分秒
    RODatePickerStyleHourMinuteSecond              //时分秒
};

@protocol RODatePickViewDelegate;
@interface RODatePickerView : UIView <UIPickerViewDataSource, UIPickerViewDelegate>



@property(nonatomic,copy)void (^cancleBlock)(UIButton *btn);


@property (nonatomic, strong) id<RODatePickViewDelegate> delegate;

@property (nonatomic, assign) RODatePickerStyle pickerStyle;

@property (nonatomic, assign) RODatePickerViewPushModel viewPushModel;

@property (nonatomic, strong) NSDate *minLimitedDate; //最小限制时间，不设置则默认为1990-01-01 00:00:00

@property (nonatomic, strong) NSDate *maxLimitedDate; //最大限制时间，不设置则默认为2040-12-31 23:59:59

@property (nonatomic, strong) NSDate *defaultLimitedDate; //默认限制时间；默认值为最小限制时间，当选择时间不在指定范围，就滚动到此默认限制时间

@property (nonatomic, strong) NSDate *scrollToDate;  // 滚动到指定时间；默认值为当前时间

- (instancetype)initWithFrame:(CGRect)frame delegate:(id<RODatePickViewDelegate>)delegate datePickerStyle:(RODatePickerStyle)datePickerStyle datePickViewPushModel:(RODatePickerViewPushModel)pushModel;

@end

@protocol RODatePickViewDelegate <NSObject>

@required

- (void)datePicker:(RODatePickerView *)datePicker didSelectDate:(RODatePickerDataModel *)datePickerDate; //选中日期的代理回调

@end



